﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlXemBaoCao.ascx.cs" Inherits="WebUserControl_ControlXemBaoCao" %>

 <%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>
 <%@ Register assembly="DevExpress.XtraReports.v9.2.Web, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraReports.Web" tagprefix="dxxr" %>
 
 <link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/datePicker.css")%>' type="text/css" />
<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />


 <script type="text/javascript">
     function pageLoad() {
     
      $(function()
        {
	            $("#<%= TextBox1.ClientID %>").datePicker(
	                {
	                    clickInput:true,
			            startDate: '01/01/1970'
	                }
	                );
        });
        
      $("#<%= ButtonXem.ClientID %>").click(function() {
       if ($("#<%= TextBox1.ClientID %>").val().length>0)
       { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } });
        } 
        }); 
       
       
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script> 


        <asp:MultiView ID="MultiView1" runat="server">
            <asp:View ID="View1" runat="server">
            <fieldset>
    <legend>Báo cáo Region and BC All Sales</legend>
    <div class="fm-req">
      <label for="DropTTPP">TTPP:</label>
      <asp:DropDownList Width="150px" ID="DropTTPP" runat="server">
                    </asp:DropDownList>
      </div>
       <div class="fm-req">
      <label for="DropVung">Vùng:</label>
      <asp:DropDownList Width="150px" ID="DropVung" runat="server">
                    </asp:DropDownList>
      </div>
       <div class="fm-req">
      <label for="TextBox1">Chọn ngày:</label>
       <asp:TextBox ID="TextBox1" runat="server">
                </asp:TextBox>
                <asp:RequiredFieldValidator Display="None" ControlToValidate="TextBox1" ID="RequiredFieldValidator1" runat="server" ErrorMessage="Phải chọn ngày">
                </asp:RequiredFieldValidator>
                <AjaxControls:ValidatorCalloutExtender TargetControlID="RequiredFieldValidator1" ID="ValidatorCalloutExtender1" runat="server">
                </AjaxControls:ValidatorCalloutExtender>
      </div>
       <div class="fm-multi">
        <div class="fm-opt">
      <label for="DropTop">Chọn top:
      <asp:DropDownList ID="DropTop" Width="50px" runat="server">
                </asp:DropDownList></label>
           <label for="DropBaoCao">cho báo cáo:
              <asp:DropDownList Width="150px" ID="DropBaoCao" runat="server">
                </asp:DropDownList></label>
                </div>  
      </div>
      </fieldset>
           <div>
          
                        <asp:Button ID="ButtonXem" runat="server" Text="Xem báo cáo" 
                            onclick="ButtonXem_Click" />
                        </div>
            </asp:View>
            
            <asp:View ID="View2" runat="server">
            
                <dxxr:ReportToolbar ID="ReportToolbar1" runat="server" 
                    ReportViewer="<%# ReportViewer1 %>" ShowDefaultButtons="False">
                    <Items>
                        <dxxr:ReportToolbarButton ItemKind="Search" 
                            ToolTip="Display the search window" />
                        <dxxr:ReportToolbarSeparator />
                        <dxxr:ReportToolbarButton ItemKind="PrintReport" ToolTip="Print the report" />
                        <dxxr:ReportToolbarButton ItemKind="PrintPage" 
                            ToolTip="Print the current page" />
                        <dxxr:ReportToolbarSeparator />
                        <dxxr:ReportToolbarButton Enabled="False" ItemKind="FirstPage" 
                            ToolTip="First Page" />
                        <dxxr:ReportToolbarButton Enabled="False" ItemKind="PreviousPage" 
                            ToolTip="Previous Page" />
                        <dxxr:ReportToolbarLabel Text="Page" />
                        <dxxr:ReportToolbarComboBox ItemKind="PageNumber" Width="65px">
                        </dxxr:ReportToolbarComboBox>
                        <dxxr:ReportToolbarLabel Text="of" />
                        <dxxr:ReportToolbarTextBox IsReadOnly="True" ItemKind="PageCount" />
                        <dxxr:ReportToolbarButton ItemKind="NextPage" ToolTip="Next Page" />
                        <dxxr:ReportToolbarButton ItemKind="LastPage" ToolTip="Last Page" />
                        <dxxr:ReportToolbarSeparator />
                        <dxxr:ReportToolbarButton ItemKind="SaveToDisk" 
                            ToolTip="Export a report and save it to the disk" />
                        <dxxr:ReportToolbarButton ItemKind="SaveToWindow" 
                            ToolTip="Export a report and show it in a new window" />
                        <dxxr:ReportToolbarComboBox ItemKind="SaveFormat" Width="70px">
                            <elements>
                                <dxxr:ListElement Text="Pdf" Value="pdf" />
                                <dxxr:ListElement Text="Xls" Value="xls" />
                                <dxxr:ListElement Text="Rtf" Value="rtf" />
                                <dxxr:ListElement Text="Mht" Value="mht" />
                                <dxxr:ListElement Text="Text" Value="txt" />
                                <dxxr:ListElement Text="Csv" Value="csv" />
                                <dxxr:ListElement Text="Image" Value="png" />
                            </elements>
                        </dxxr:ReportToolbarComboBox>
                    </Items>
                    <styles>
                        <LabelStyle>
                        <margins marginleft="3px" marginright="3px" />
                        </LabelStyle>
                    </styles>
                </dxxr:ReportToolbar>
                <br />
                <dxxr:ReportViewer ID="ReportViewer1" runat="server">
                </dxxr:ReportViewer>
            
            </asp:View> 
        </asp:MultiView>
        
        
      
        <uc2:uscMsgBox ID="uscMsgBox1" runat="server" />

   

